package com.jf.blogbackened.mapper;

import com.jf.blogbackened.bean.Category;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
 * @author David
 */
@Mapper
public interface CategoryMapper {
    Integer getCount(String name);

    List<Category> getPageData(@Param("name") String name, @Param("offset") Integer offset, @Param("pageSize") Integer pageSize);

    int getCategoryCountByName(String name);

    int insert(Category category);

    int update(Category category);

    Category getCategoryById(Integer id);

    int delCategoryById(Integer id);

    List<Category> getAllCategory();
}
